<?php
    $pageName = "playScenarios"; 
?>
<?php require_once('header.php'); ?>    


<div class="repCont brd">
 
<?php     
$scnId  = trim( Request::getVar('scnId') ); // (isset($_GET['scnId']))? $_GET['scnId']:"" ; 
$action  = trim( Request::getVar('scnAct') ); //(isset($_GET['scnAct']))? $_GET['scnAct']:"" ; 

$wella = new Base();

  
 if ((intval($scnId)>0) && $action=='playScn'){
    
 $scnObj  = $wella->getScenarios($scnId) ;
 
 $scnTitle    = $scnObj[0][1];  
 $scnDesc    = $scnObj[0][2];
 $scnReports    = $scnObj[0][3];
 //var_dump($scnObj) ;
    
?>                                                                                      

<style>
#actionButtons {
    text-align:center;
    margin-top:30px;
}
</style>

<!-- required CSS files -->
    <link rel="stylesheet" type="text/css" href="css/edf_tools.css" />  
                                                                  
<div class=" brd">
    <a title="show all reports" href="showScenario.php?scnId='<?php echo $scnId;?>'">&lt;&lt; Back to Scenario: <?php echo $scnTitle;?></a><br><br>  
<h2><?php echo $scnTitle;?></h2>    
</div> 
   

<div class="" id=scrollerCont> 


<!-- "previous page" action -->
<a class="prev browse left"></a>

<!-- root element for scrollable -->
<div class="scrollable" id=scroller>   
   
   <!-- root element for the items -->
   <div class="items">
    <?php
    if (!empty($scnReports)){
        
   $scnReportsArr = explode(',', $scnReports);
   //var_dump($reports);
   
   
   if (sizeof($scnReportsArr)>0){
       foreach($scnReportsArr as $reportId)   {
       
?>

    <div class="report">
<?php $wella->showFullReport($reportId,''); ?>
    </div>
                        
<?php
       }
   }
}
?>
      
      
      
     
      
   </div>
   
</div>

<!-- "next page" action -->
<a class="next browse right"></a>


<br clear="all" />



<div id="actionButtons">
    <button type="button" id="playBut">Play</button>
    <button type="button" id="pauseBut">Pause</button>
    <button type="button" id="stopBut">Stop</button>
</div>               
</div>               

<br clear="all" />

<?php
    
    
}else {
    echo 'no id or action supplied';
}
//}
?>
 <?php require_once('links.php'); ?>  



</div>  

 
<?php require_once('footer.php'); ?>   